package com.project.bohang.controller;


import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.project.bohang.common.model.Response;
import com.project.bohang.common.model.page.PageResult;
import com.project.bohang.entity.Notice;
import com.project.bohang.pojo.dto.NoticeDto;
import com.project.bohang.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *  疫情公告管理（用户）
 *
 * @author bohang
 * @since 2022-03-27
 */
@Controller
@RequestMapping("/userNotice")
@ResponseBody
public class UserNoticeController extends BaseController {

    @Autowired
    private NoticeService noticeService;


    /**
     * 疫情公告列表
     *
     * @param dto
     * @return
     */
    @PostMapping("/list")
    public Response<PageResult<Notice>> selectList(@RequestBody NoticeDto dto){
        return Response.success(getDataTable(noticeService.selectList(dto)));
    }
}

